On Combinatorial Generation of Prefix Normal Words
نویسندگان
چکیده
A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. This class of words is important in the context of binary jumbled pattern matching. In this paper we present an efficient algorithm for exhaustively listing the prefix normal words with a fixed length. The algorithm is based on the fact that the language of prefix normal words is a bubble language, a class of binary languages with the property that, for any word w in the language, exchanging the first occurrence of 01 by 10 in w results in another word in the language. We prove that each prefix normal word is produced in O(n) amortized time, and conjecture, based on experimental evidence, that the true amortized running time is O(log(n)).
منابع مشابه
Bubble-Flip - A New Generation Algorithm for Prefix Normal Words
We present a new recursive generation algorithm for prefix normal words. These are binary strings with the property that no substring has more 1s than the prefix of the same length. The new algorithm uses two operations on binary strings, which exploit certain properties of prefix normal words in a smart way. We introduce infinite prefix normal words and show that one of the operations used by ...
متن کاملOn prefix normal words and prefix normal forms
A 1-prefix normal word is a binary word with the property that no factor has more 1s than the prefix of the same length; a 0-prefix normal word is defined analogously. These words arise in the context of indexed binary jumbled pattern matching, where the aim is to decide whether a word has a factor with a given number of 1s and 0s (a given Parikh vector). Each binary word has an associated set ...
متن کاملRandom generation of finite Sturmian words
We present a bijection between the set of factors of given length of Sturmian words and some set of triples of nonnegative integers. This bijection and its inverse are both computable in linear time. Its applications are: a bijective proof of Mignosi's formula for counting Sturmian words, a linear probabilistic algorithm for generating finite Sturmian word at random, and, using similar techniqu...
متن کاملAsymptotic normality and combinatorial aspects of the prefix exchange distance distribution
The prefix exchange distance of a permutation is the minimum number of exchanges involving the leftmost element that sorts the permutation. We give new combinatorial proofs of known results on the distribution of the prefix exchange distance for a random uniform permutation. We also obtain expressions for the mean and the variance of this distribution, and finally, we show that the normalised p...
متن کاملNormal, Abby Normal, Prefix Normal
A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. This class of words is important in the context of binary jumbled pattern matching. In this paper we present results about the number pnw(n) of prefix normal words of length n, showing that pnw(n) = Ω ( 2n−c √ n lnn ) for some c and pnw(n) = O ( 2(lnn) n ) . We introduce eff...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014